﻿using System;
using System.Web.UI.WebControls;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using Base_Alpha_1;

public static class SysMessages
    {
        public static void write_msg(string type,string msg,MasterPage caller_master)
        {
            
            HtmlLink css = new HtmlLink();
            css.Href = "~/css/typocss/msg_css.css";
            css.Attributes["rel"] = "stylesheet";
            css.Attributes["type"] = "text/css";
            css.Attributes["media"] = "all";
            ContentPlaceHolder head = (ContentPlaceHolder)caller_master.FindControl("head");
            head.Controls.Add(css);
            ContentPlaceHolder system_msgs = (ContentPlaceHolder)caller_master.FindControl("system_inner_msgs");
            Literal msg_text = new Literal();
            msg_text.Text = "<p class='cdtypocss_icon_"+type+"'>"+msg+"</p>";
            system_msgs.Controls.Add(msg_text);

        }
    }

